<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Talking 后台管理 -- 我们致力于打造最专业的贴吧</title>
<link rel="stylesheet" href="./static/css/frame.css" />
<script src="./static/js/jquery-1.3.min.js"></script>
<script src="./static/js/jquery.form.js"></script>
<script src="./static/js/common.js"></script>
<script type="text/javascript"> 
$(document).ready(function(){
    var options = {                        
        dataType     : 'json',
        beforeSubmit : validate,
        success      : initTable
    };
    $('#btnSubmit').click(function(){ 
        $('#form').ajaxSubmit(options);
    });
    $('#addUser').click(function(){
        $('.list tr:last').before("<tr>"+
        "<td></td>"+
        "<td><input type='text' style='width:180px;' name='users[ ]' /></td>"+
        "<td></td>"+
        "<td></td>"+
        "<td></td>"+
        "<td></td>"+
        "</tr>");
        if($('body').height()>=500){
            top.resizeFrame();
        }
    });
    $('#chkDel').click(function(){
        if($(this).attr('checked')==true){
            $('input[type=checkbox]').each(function(i){
                $(this).attr('checked','checked');
            });
        }
        else{
            $('input[type=checkbox]').each(function(i){
                $(this).removeAttr('checked');
            });
        }
    });
});  
</script>
</head>

<body>
<div id="content">
    <div class="title">用户 » 用户过滤</div>
    <div class="main">
        <h3>用户过滤</h3> 
        <form action="./user_filter.php" name="form" method="post" id="form">
        <input type="hidden" name="submit" value="submit" />
        <table cellpadding="0" cellspacing="0" class="list">
            <tbody>
                <tr>
                    <td width="30" align="center">删除</td>
                    <td width="200">用户名</td>
                    <td align="center">邮箱</td>
                    <td width="40" align="center">发帖数</td>
                    <td width="150" align="center">上次登录时间</td>
                    <td width="100" align="center">注册时间</td> 
                </tr>
                {{section name=n loop=$users}}
                <tr>
                    <td align="center"><input type="checkbox" name="dels[ ]" value="{{$users[n].UserID}}" /></td>
                    <td>{{$users[n].UserName}}</td>
                    <td align="center">{{$users[n].UserEmail}}</td>
                    <td align="center">{{$users[n].UserPostNum}}</td>
                    <td align="center">{{$users[n].UserLastLoginTime}}</td>
                    <td align="center">{{$users[n].UserRegistTime}}</td>
                </tr>
                {{/section}}  
                <tr>                                                               
                    <td align="center"><input type="checkbox" id="chkDel" /></td>
                    <td colspan="5">
                        <a href="javascript:void(0)" id="addUser">添加用户</a>
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
            <input type="button" class="button_submit" id="btnSubmit" value="提交" />  
        </p> 
        </form>
    </div>
</div>
</body>
</html>
